package com.jfs.qy.entity;

import lombok.Data;

import java.io.Serializable;

/**
 * @Description 发送消息给rabibitmq 消息实体对象
 * @E-mail cwm3412638@163.com
 * @Author cwm
 * @Date 2022/11/7
 */
@Data
public class MqAlarmMessage implements Serializable {
    /**
     * 告警名称
     */
    private String name;
    /**
     * 告警通道名称
     */
    private String channelName;
    /**
     * 告警通道ip
     */
    private String ip;
    /**
     * 告警的时间
     */
    private String time;
    /**
     * 告警视频播放地址
     */
    private String videoPath;
    /**
     * 告警视频封面图地址
     */
    private String imagePath;

    /**
     * 告警类型
     */
    private Integer type;

    private MqAlarmMessage(Builder builder) {
        this.name = builder.name;
        this.channelName = builder.channelName;
        this.ip = builder.ip;
        this.time = builder.time;
        this.videoPath = builder.videoPath;
        this.imagePath = builder.imagePath;
        this.type = builder.type;
    }


    public static class Builder {

        private String name;

        private String channelName;

        private String ip;

        private String time;

        private String videoPath;

        private String imagePath;

        private Integer type;

        public Builder() {
        }

        public Builder name(String name) {
            this.name = name;
            return this;
        }

        public Builder channelName(String channelName) {
            this.channelName = channelName;
            return this;
        }

        public Builder ip(String ip) {
            this.ip = ip;
            return this;
        }

        public Builder time(String time) {
            this.time = time;
            return this;
        }

        public Builder videoPath(String videoPath) {
            this.videoPath = videoPath;
            return this;
        }

        public Builder imagePath(String imagePath) {
            this.imagePath = imagePath;
            return this;
        }

        public Builder type(Integer type) {
            this.type = type;
            return this;
        }

        public MqAlarmMessage build() {
            return new MqAlarmMessage(this);
        }
    }

}
